From: Bilal Elmoussaoui Date: Mon, 21 Oct 2024 10:39:57 +0000 (+0200) Subject: magnifier: Use the new get_client_content_rect API X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~173^2^2~179 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d92f8daf62ab5a9d1c02f82701d74a9f87ae01ee;p=gnome-shell.git magnifier: Use the new get_client_content_rect API As we have removed is_client_decorated from Mutter in the last release. Instead of re-adding it and re-exposing SSD/CSD differences and making gnome-shell deal with that, we created a new API that does exactly what is_client_decorated was used for, so switch to using that. Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7984 Part-of: --- diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index bcfdda1d9..ac0826e03 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -864,10 +864,7 @@ class ZoomRegion { if (!focusWindow) return null; - let windowRect = focusWindow.get_frame_rect(); - if (!focusWindow.is_client_decorated()) - windowRect = focusWindow.frame_rect_to_client_rect(windowRect); - + const windowRect = focusWindow.get_client_content_rect(); const scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor; const screenSpaceExtents = new Atspi.Rect({ x: windowRect.x + (scaleFactor * extents.x),